<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>bootstrap折叠菜单</title>
    <link rel="stylesheet" href="../css/bootstrap.css">
</head>
<style>
    main {
        margin: 1%;
        padding: 1%;
    }
</style>

<body>

    <main>
        <div class="card">
            <div>
                <button class="btn btn-success" href="#go" data-toggle="collapse">按钮</button>
            </div>
            <div id="go" class="collapse border border-success">
                <p>
                    内容........
                </p>
            </div>

        </div>
        <div class="card">
            <div>
                <button class="btn btn-success" href=".gogogo" data-toggle="collapse">全部展开</button>
            </div>
            <div class="gogogo collapse">
                <p>文字111111111</p>
            </div>
            <div class="gogogo collapse">
                <p>文字111111111</p>
            </div>
        </div>

        <div class="accordion w-50" id="parent-div">
            <div class="card">
                <button class="btn btn-link" data-toggle="collapse" data-target="#accordion1">按钮1</button>
                <div class="collapse" id="accordion1" data-parent="#parent-div">
                    <p>按钮1 对应的文字</p>
                </div>
            </div>
            <div class="card">
                <button class="btn btn-link" data-toggle="collapse" data-target="#accordion2">按钮2</button>
                <div class="collapse" id="accordion2" data-parent="#parent-div">
                    <p>按钮2 对应的文字</p>
                </div>
            </div>
            <div class="card">
                <button class="btn btn-link" data-toggle="collapse" data-target="#accordion3">按钮3</button>
                <div class="collapse" id="accordion3" data-parent="#parent-div">
                    <p>按钮3 对应的文字</p>
                </div>
            </div>
        </div>

    </main>


    <script src="../js/jquery.min.js"></script>
    <script src="../js/bootstrap.js"></script>
</body>

</html>